Skip to content

Register assertion handler to print failure details to stderr#299

Merged
NicolasFussberger merged 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/make-assertion-messages-visible
Jul 14, 2026
Merged

Register assertion handler to print failure details to stderr#299
NicolasFussberger merged 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/make-assertion-messages-visible

Conversation

@shegazyy

@shegazyy shegazyy commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Without a registered handler, SCORE_LANGUAGE_FUTURECPP_ASSERT failures call std::abort silently, giving no indication of what failed or where.

Register a handler at daemon startup that writes the failed condition, optional message, file, line, and function to stderr before abort.

Closes: #296

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: bb8dd713-27ce-4227-9394-3f8f3ba5e12f
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (31 packages loaded, 10 targets configured)

Analyzing: target //:license-check (80 packages loaded, 10 targets configured)

Analyzing: target //:license-check (86 packages loaded, 10 targets configured)

Analyzing: target //:license-check (144 packages loaded, 2767 targets configured)

Analyzing: target //:license-check (152 packages loaded, 5481 targets configured)

Analyzing: target //:license-check (157 packages loaded, 6747 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8246 targets configured)

Analyzing: target //:license-check (164 packages loaded, 8271 targets configured)

Analyzing: target //:license-check (164 packages loaded, 8271 targets configured)

Analyzing: target //:license-check (165 packages loaded, 8273 targets configured)

Analyzing: target //:license-check (167 packages loaded, 10159 targets configured)

Analyzing: target //:license-check (168 packages loaded, 10283 targets configured)

INFO: Analyzed target //:license-check (169 packages loaded, 10409 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions, 1 running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 25.990s, Critical Path: 2.73s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@shegazyy

shegazyy commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Hey @danth 🙏 ready for review whenever you have a moment!

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@danth danth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When an assertion fails inside bazel test, the punctuation gets split onto separate lines:

[2026-07-09 09:38:49.947] [INFO] [launch_manager] Assertion failed:
[2026-07-09 09:38:49.947] [INFO] [launch_manager] osal_result != OsalReturnType::kSuccess
[2026-07-09 09:38:49.947] [INFO] [launch_manager] Location:
[2026-07-09 09:38:49.947] [INFO] [launch_manager] score/launch_manager/src/daemon/src/process_group_manager/details/process_group_manager.cpp
[2026-07-09 09:38:49.947] [INFO] [launch_manager] :
[2026-07-09 09:38:49.947] [INFO] [launch_manager] 166
[2026-07-09 09:38:49.947] [INFO] [launch_manager] (
[2026-07-09 09:38:49.947] [INFO] [launch_manager] bool score::lcm::internal::ProcessGroupManager::initializeControlClientHandler()
[2026-07-09 09:38:49.947] [INFO] [launch_manager] )
[2026-07-09 09:38:49.948] [INFO] [launch_manager] Message:
[2026-07-09 09:38:49.948] [INFO] [launch_manager] ControlClientChannel semaphore init failed

Maybe we should build the string and write it to cerr in one go (or at most once per line) to avoid this.

@shegazyy shegazyy force-pushed the fix/make-assertion-messages-visible branch from e7fb36e to 5cbbe7c Compare July 12, 2026 10:08
@shegazyy shegazyy temporarily deployed to workflow-approval July 12, 2026 10:08 — with GitHub Actions Inactive
@shegazyy shegazyy temporarily deployed to workflow-approval July 12, 2026 10:08 — with GitHub Actions Inactive
@NicolasFussberger NicolasFussberger requested a review from danth July 13, 2026 06:50
@shegazyy shegazyy requested a deployment to workflow-approval July 13, 2026 10:49 — with GitHub Actions Waiting
@shegazyy shegazyy requested a deployment to workflow-approval July 13, 2026 10:49 — with GitHub Actions Waiting
@shegazyy

Copy link
Copy Markdown
Contributor Author

@NicolasFussberger @danth branch is updated with the latest main

Without a registered handler, SCORE_LANGUAGE_FUTURECPP_ASSERT failures
call std::abort silently, giving no indication of what failed or where.

Register a handler at daemon startup that writes the failed condition,
optional message, file, line, and function to stderr before abort.

Closes: eclipse-score#296
@shegazyy shegazyy force-pushed the fix/make-assertion-messages-visible branch from 08e11c5 to d33d369 Compare July 13, 2026 15:49
@shegazyy shegazyy temporarily deployed to workflow-approval July 13, 2026 15:49 — with GitHub Actions Inactive
@shegazyy shegazyy temporarily deployed to workflow-approval July 13, 2026 15:49 — with GitHub Actions Inactive
@NicolasFussberger NicolasFussberger merged commit 43f4587 into eclipse-score:main Jul 14, 2026
24 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in LCM - Lifecycle & Health FT Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Make assertion messages visible

3 participants